home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_ColorPicker.asp < prev    next >
Encoding:
Text File  |  1999-05-12  |  10.6 KB  |  208 lines

  1. <%@LANGUAGE="VBSCRIPT"%>
  2.  
  3. <% 
  4.     If Request.Form("RequestMode") = "Update" Then
  5.         Dim strTextChoice, strColorChoice, strURLRedirect
  6.  
  7.         strTextChoice = Request.Form("TextChoice")
  8.         strColorChoice = Request.Form("ColorChoice")
  9.  
  10.         If strTextChoice = "HTML" Then
  11.             Response.Cookies("MSASPHTMLColor") = CStr(strColorChoice)
  12.             Response.Cookies("MSASPHTMLColor").Expires = "January 1, " & Year(Date()) + 1
  13.             Response.Cookies("MSASPHTMLColor").Secure = FALSE
  14.             'Response.Cookies("MSASPHTMLColor").Domain = "/"
  15.         ElseIf strTextChoice = "ClientSide" Then
  16.             Response.Cookies("MSASPClientSideColor") = CStr(strColorChoice)
  17.             Response.Cookies("MSASPClientSideColor").Expires = "January 1, " & Year(Date()) + 1
  18.             Response.Cookies("MSASPClientSideColor").Secure = FALSE
  19.             'Response.Cookies("MSASPClientSideColor").Domain = "/"
  20.         ElseIf strTextChoice = "ServerSide" Then
  21.             Response.Cookies("MSASPServerSideColor") = CStr(strColorChoice)
  22.             Response.Cookies("MSASPServerSideColor").Expires = "January 1, " & Year(Date()) + 1
  23.             Response.Cookies("MSASPServerSideColor").Secure = FALSE
  24.             'Response.Cookies("MSASPServerSideColor").Domain = "/"
  25.         ElseIf strTextChoice = "Comments" Then
  26.             Response.Cookies("MSASPCommentsColor") = CStr(strColorChoice)
  27.             Response.Cookies("MSASPCommentsColor").Expires = "January 1, " & Year(Date()) + 1
  28.             Response.Cookies("MSASPCommentsColor").Secure = FALSE
  29.             'Response.Cookies("MSASPCommentsColor").Domain = "/"
  30.         End If
  31.  
  32.         strURLRedirect = Request.Form("HTTPReferer")
  33.         Response.Redirect(strURLRedirect)
  34.  
  35.     Else
  36.         
  37.         Dim strUpdateTarget
  38.         strUpdateTarget = Request.QueryString("UpdateTarget")
  39.  
  40.     End If
  41. %>
  42. <html>
  43.  
  44. <head>
  45. <title>Color Choices for ASP Code Viewer</title>
  46. <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
  47. </head>
  48.  
  49. <body>
  50. <p><big><big><strong><font face="Arial">Color Choices for ASP Code Viewer</font></strong></big></big></p>
  51.  
  52. <hr>
  53.  
  54. <% If Request.Form("RequestMode") = "Update" Then %>
  55. <UL>
  56. <LI>TextChoice = <%=strTextChoice%></LI>
  57. <LI>ColorChoice = <%=strColorChoice%></LI>
  58. </UL>
  59. <% Else %>
  60. <form method="POST" action="colorpicker.asp" name="ColorPicker">
  61.   <input type="hidden" name="RequestMode" value="Update">
  62.   <input type="hidden" name="HTTPReferer" value="<%=Request.ServerVariables("HTTP_REFERER")%>">
  63.   <div align="left"><table border="0"
  64.   cellpadding="0" cellspacing="0" width="100%">
  65.     <tr>
  66.       <td width="25%" valign="top" align="left"><strong>Text Choice</strong><div align="left"><table
  67.       border="0" cellpadding="0" cellspacing="0" width="100%">
  68.         <tr>
  69.           <td width="100%"><small><input type="radio" name="TextChoice" value="HTML" <% If strUpdateTarget = "HTML" Or strUpdateTarget = "" Then Response.Write "CHECKED" %>>HTML
  70.           and Text<br>
  71.           <input type="radio" name="TextChoice" value="ClientSide" <% If strUpdateTarget = "ClientSide" Then Response.Write "CHECKED" %>>Client Side Script<br>
  72.           <input type="radio" name="TextChoice" value="ServerSide" <% If strUpdateTarget = "ServerSide" Then Response.Write "CHECKED" %>>Server Side Script<br>
  73.           <input type="radio" name="TextChoice" value="Comments" <% If strUpdateTarget = "Comments" Then Response.Write "CHECKED" %>>Comments (HTML and Script)</small></td>
  74.         </tr>
  75.       </table>
  76.       </div><p><br>
  77.       </td>
  78.       <td width="75%" valign="top" align="left"><strong>Color Choice</strong><div align="left"><table
  79.       border="0" cellpadding="0" cellspacing="0" width="100%">
  80.         <tr>
  81.           <td width="4%"><input type="radio" value="#FF8080" checked name="ColorChoice"></td>
  82.           <td width="12%" bgcolor="#FF8080"></td>
  83.           <td width="4%"><input type="radio" name="ColorChoice" value="FFFF80"></td>
  84.           <td width="12%" bgcolor="#FFFF80"></td>
  85.           <td width="4%"><input type="radio" name="ColorChoice" value="80FF80"></td>
  86.           <td width="12%" bgcolor="#80FF80"></td>
  87.           <td width="4%"><input type="radio" name="ColorChoice" value="00FF80"></td>
  88.           <td width="12%" bgcolor="#00FF80"></td>
  89.           <td width="4%"><input type="radio" name="ColorChoice" value="80FFFF"></td>
  90.           <td width="12%" bgcolor="#80FFFF"></td>
  91.           <td width="4%"><input type="radio" name="ColorChoice" value="0080FF"></td>
  92.           <td width="12%" bgcolor="#0080FF"></td>
  93.         </tr>
  94.         <tr>
  95.           <td width="4%"><input type="radio" name="ColorChoice" value="FF80C0"></td>
  96.           <td width="12%" bgcolor="#FF80C0"></td>
  97.           <td width="4%"><input type="radio" name="ColorChoice" value="FF80FF"></td>
  98.           <td width="12%" bgcolor="#FF80FF"></td>
  99.           <td width="4%"><input type="radio" name="ColorChoice" value="FF0000"></td>
  100.           <td width="12%" bgcolor="#FF0000"></td>
  101.           <td width="4%"><input type="radio" name="ColorChoice" value="FFFF00"></td>
  102.           <td width="12%" bgcolor="#FFFF00"></td>
  103.           <td width="4%"><input type="radio" name="ColorChoice" value="80FF00"></td>
  104.           <td width="12%" bgcolor="#80FF00"></td>
  105.           <td width="4%"><input type="radio" name="ColorChoice" value="00FF40"></td>
  106.           <td width="12%" bgcolor="#00FF40"></td>
  107.         </tr>
  108.         <tr>
  109.           <td width="4%"><input type="radio" name="ColorChoice" value="00FFFF"></td>
  110.           <td width="12%" bgcolor="#00FFFF"></td>
  111.           <td width="4%"><input type="radio" name="ColorChoice" value="0080C0"></td>
  112.           <td width="12%" bgcolor="#0080C0"></td>
  113.           <td width="4%"><input type="radio" name="ColorChoice" value="8080C0"></td>
  114.           <td width="12%" bgcolor="#8080C0"></td>
  115.           <td width="4%"><input type="radio" name="ColorChoice" value="FF00FF"></td>
  116.           <td width="12%" bgcolor="#FF00FF"></td>
  117.           <td width="4%"><input type="radio" name="ColorChoice" value="804040"></td>
  118.           <td width="12%" bgcolor="#804040"></td>
  119.           <td width="4%"><input type="radio" name="ColorChoice" value="FF8040"></td>
  120.           <td width="12%" bgcolor="#FF8040"></td>
  121.         </tr>
  122.         <tr>
  123.           <td width="4%"><input type="radio" name="ColorChoice" value="00FF00"></td>
  124.           <td width="12%" bgcolor="#00FF00"></td>
  125.           <td width="4%"><input type="radio" name="ColorChoice" value="008080"></td>
  126.           <td width="12%" bgcolor="#008080"></td>
  127.           <td width="4%"><input type="radio" name="ColorChoice" value="004080"></td>
  128.           <td width="12%" bgcolor="#004080"></td>
  129.           <td width="4%"><input type="radio" name="ColorChoice" value="8080FF"></td>
  130.           <td width="12%" bgcolor="#8080FF"></td>
  131.           <td width="4%"><input type="radio" name="ColorChoice" value="800040"></td>
  132.           <td width="12%" bgcolor="#800040"></td>
  133.           <td width="4%"><input type="radio" name="ColorChoice" value="FF0080"></td>
  134.           <td width="12%" bgcolor="#FF0080"></td>
  135.         </tr>
  136.         <tr>
  137.           <td width="4%"><input type="radio" name="ColorChoice" value="800000"></td>
  138.           <td width="12%" bgcolor="#800000"></td>
  139.           <td width="4%"><input type="radio" name="ColorChoice" value="FF8000"></td>
  140.           <td width="12%" bgcolor="#FF8000"></td>
  141.           <td width="4%"><input type="radio" name="ColorChoice" value="008000"></td>
  142.           <td width="12%" bgcolor="#008000"></td>
  143.           <td width="4%"><input type="radio" name="ColorChoice" value="008040"></td>
  144.           <td width="12%" bgcolor="#008040"></td>
  145.           <td width="4%"><input type="radio" name="ColorChoice" value="0000FF"></td>
  146.           <td width="12%" bgcolor="#0000FF"></td>
  147.           <td width="4%"><input type="radio" name="ColorChoice" value="0000A0"></td>
  148.           <td width="12%" bgcolor="#0000A0"></td>
  149.         </tr>
  150.         <tr>
  151.           <td width="4%"><input type="radio" name="ColorChoice" value="800080"></td>
  152.           <td width="12%" bgcolor="#800080"></td>
  153.           <td width="4%"><input type="radio" name="ColorChoice" value="8000FF"></td>
  154.           <td width="12%" bgcolor="#8000FF"></td>
  155.           <td width="4%"><input type="radio" name="ColorChoice" value="400000"></td>
  156.           <td width="12%" bgcolor="#400000"></td>
  157.           <td width="4%"><input type="radio" name="ColorChoice" value="804000"></td>
  158.           <td width="12%" bgcolor="#804000"></td>
  159.           <td width="4%"><input type="radio" name="ColorChoice" value="004000"></td>
  160.           <td width="12%" bgcolor="#004000"></td>
  161.           <td width="4%"><input type="radio" name="ColorChoice" value="004040"></td>
  162.           <td width="12%" bgcolor="#004040"></td>
  163.         </tr>
  164.         <tr>
  165.           <td width="4%"><input type="radio" name="ColorChoice" value="000080"></td>
  166.           <td width="12%" bgcolor="#000080"></td>
  167.           <td width="4%"><input type="radio" name="ColorChoice" value="000040"></td>
  168.           <td width="12%" bgcolor="#000040"></td>
  169.           <td width="4%"><input type="radio" name="ColorChoice" value="400040"></td>
  170.           <td width="12%" bgcolor="#400040"></td>
  171.           <td width="4%"><input type="radio" name="ColorChoice" value="400080"></td>
  172.           <td width="12%" bgcolor="#400080"></td>
  173.           <td width="4%"><input type="radio" name="ColorChoice" value="000000"></td>
  174.           <td width="12%" bgcolor="#000000"></td>
  175.           <td width="4%"><input type="radio" name="ColorChoice" value="808000"></td>
  176.           <td width="12%" bgcolor="#808000"></td>
  177.         </tr>
  178.         <tr>
  179.           <td width="4%"><input type="radio" name="ColorChoice" value="808040"></td>
  180.           <td width="12%" bgcolor="#808040"></td>
  181.           <td width="4%"><input type="radio" name="ColorChoice" value="808080"></td>
  182.           <td width="12%" bgcolor="#808080"></td>
  183.           <td width="4%"><input type="radio" name="ColorChoice" value="408080"></td>
  184.           <td width="12%" bgcolor="#408080"></td>
  185.           <td width="4%"><input type="radio" name="ColorChoice" value="C0C0C0"></td>
  186.           <td width="12%" bgcolor="#C0C0C0"></td>
  187.           <td width="4%"><input type="radio" name="ColorChoice" value="400040"></td>
  188.           <td width="12%" bgcolor="#400040"></td>
  189.           <td width="4%"><input type="radio" name="ColorChoice" value="FFFFFF"></td>
  190.           <td width="12%"><div align="left"><table border="2" cellpadding="0" cellspacing="0"
  191.           width="100%" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000">
  192.             <tr>
  193.               <td width="100%" bgcolor="#FFFFFF"> </td>
  194.             </tr>
  195.           </table>
  196.           </div></td>
  197.         </tr>
  198.       </table>
  199.       </div></td>
  200.     </tr>
  201.   </table>
  202.   </div><p><input type="submit" value="Update Preferences" name="Submit"></p>
  203. </form>
  204. <% End If %>
  205. <hr>
  206. </body>
  207. </html>
  208.